<?php
namespace App\TxSchool\Type;
/**
 * Class School
 * @package App\TxSchool\Type
 * 学校/上级单位 模式
 */
class School extends Type{

    public function __construct(array $params)
    {
        if(isset($params['devCode'])){
            $this->set('devCode',$params['devCode']);
        }
        if(isset($params['objectid'])){
            $this->set('objectid',$params['objectid']);
        }
        if(isset($params['objType'])){
            $this->set('objType',$params['objType']);
        }
        if(isset($params['key'])){
            $this->key = $params['key'];
        }
        $this->setTypeSchool();
    }

    public function setTypeSchool(){
        $this->set("devType",self::DEV_TYPE_SCHOOL);
        return $this;
    }

    public function setTypeParent(){
        $this->set("devType",self::DEV_TYPE_PARENT);
        return $this;
    }

    public function setTypeDev(){
        return $this->set("devType",self::DEV_TYPE_CO);
    }



}
